#ifndef LOCALMAP_HPP
#define LOCALMAP_HPP

#include <boost/any.hpp>
#include <boost/thread/shared_mutex.hpp>
#include <map>
#include <string>
#include <sys/time.h>
#include "transport_interface.hpp"
namespace pipc
{
class LocalMap : public TransportInterface
{
public:
    LocalMap();
    bool setValue(std::string key, Record value);
    Record getValue(std::string key);
    bool isSynced(std::string key);
    bool subscibe(std::string key, bool reader);
    bool isRunning();
    void clear();
    bool start();
    bool stop();

private:
    std::map <std::string, Record > settings_;
    boost::shared_mutex serializer_;
    bool running_;
};

}
#endif // LOCALMAP_HPP
